Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use +- install output for Python versions #5201

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Follow-up to #4939. Uses a format that's closer to uv pip install, with some special-casing for single Pythons.

Test Plan

A few examples:

Screenshot 2024-07-18 at 8 39 35 PM
Screenshot 2024-07-18 at 8 39 46 PM
Screenshot 2024-07-18 at 8 39 27 PM
Screenshot 2024-07-18 at 8 39 54 PM

@charliermarsh charliermarsh added cli Related to the command line interface preview Experimental behavior labels Jul 19, 2024
installation.key().green(),
)?;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ended up feeling unnecessary now that we show the summary at the end.

@@ -350,7 +350,7 @@ impl Ord for PythonInstallationKey {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.implementation
.cmp(&other.implementation)
.then_with(|| other.version().cmp(&self.version()))
.then_with(|| self.version().cmp(&other.version()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is inverted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I should've added a explanation here. This is intentional to ensure that Python installations are sorted in descending order by version. #5139

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! haha

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, I'll take a look.

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gorgeous.

@charliermarsh
Copy link
Member Author

Thank you!

@charliermarsh charliermarsh merged commit d54ae4e into main Jul 19, 2024
@charliermarsh charliermarsh deleted the charlie/install-message branch July 19, 2024 00:46
charliermarsh added a commit that referenced this pull request Jul 19, 2024
## Summary

See: #5139 and
#5201 (comment).

## Test Plan

Verified that 3.12 was chosen above 3.8 in:

- `cargo run -- python uninstall --all`
- `cargo run -- python install 3.8 3.12`
- `cargo run -- tool run -v httpx`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants